<?php

/**
 *  @FileComment            [前台首页控制器]
 *  @ProjectName             项目名称：shopFrame
 *  @FileName                   文件名称：IndexController.class.php
 *  @Author                       yuerengui <596580041@qq.com>
 *  @Date                          2014-10-14 23:21:12
 *  *
 */
class IndexController extends CommonController {

        public function index() {
                //首页分类信息
                $data = K('Category')->get_cate_data();
                $this->assign('cateData', $data);
                $data = K('Category')->get_detail_cate();
                $this->assign('catedetail', $data);
                //首页商品信息
                $goods = K('Goods')->get_like_data(NULL, 8);
                $this->assign('goodsData', $goods);
                $goodshot = K('Goods')->get_like_data(NULL, 10);
                $this->assign('goodshot', $goodshot);
                $goodsAll = K('Goods')->get_like_data(NULL, 10, 'gid Desc');
                $this->assign('goodsall', $goodsAll);
                $nvGoods = K('Goods')->get_like_data('type_tid=6', 8);
                $this->assign('nvGoods', $nvGoods);
                $brandGoods = K('Goods')->get_like_data('type_tid=6', 10, 'gid Desc');
                $this->assign('brandGoods', $brandGoods);
                $brandGoods2 = K('Goods')->get_like_data('type_tid=6', 10, 'gid ASC');
                $this->assign('brandGoods2', $brandGoods2);
                $brandGoods3 = K('Goods')->get_like_data('type_tid=6', 10, 'gid Desc');
                $this->assign('brandGoods3', $brandGoods3);
                $brandGoods4 = K('Goods')->get_like_data('type_tid=6', 10, 'gid ASC');
                $this->assign('brandGoods4', $brandGoods4);
                //首页品牌信息
                $brand = K('Brand')->get_all();
                $this->assign('BrandData', $brand);
                $nvBrandData = K('Brand')->get_all(array('type_tid' => 6));
                $this->assign('nvBrandData', $nvBrandData);
                $this->display();
        }

}
